home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / webbro1a / wtypes.idl < prev   
Text File  |  1999-06-23  |  46KB  |  1,513 lines

  1. //+-------------------------------------------------------------------------
  2. //
  3. //  Microsoft Windows
  4. //  Copyright 1992 - 1998 Microsoft Corporation.
  5. //
  6. //  File: wtypes.idl
  7. //
  8. //  Contents: This interface definition contains typedefs for remotable
  9. //            data types.
  10. //
  11. //  History:  09-May-96  MikeHill  Updated VARENUM comments.
  12. //            22-May-96  MikeHill  Added FMTID defintions/macros.
  13. //            06-Jun-96  MikeHill  Added CBPCLIPDATA macro.
  14. //
  15. //--------------------------------------------------------------------------
  16.  
  17. cpp_quote("//+-------------------------------------------------------------------------")
  18. cpp_quote("//")
  19. cpp_quote("//  Microsoft Windows")
  20. cpp_quote("//  Copyright 1992 - 1998 Microsoft Corporation.")
  21. cpp_quote("//")
  22. cpp_quote("//--------------------------------------------------------------------------")
  23.  
  24. [ uuid(D3980A60-910C-1068-9341-00DD010F2F1C),
  25.   version(0.1), pointer_default(unique) ]
  26.  
  27. interface IWinTypes
  28. {
  29.  
  30. typedef struct tagRemHGLOBAL
  31. {
  32.         long fNullHGlobal;
  33.         unsigned long cbData;
  34.         [size_is(cbData)] byte data[];
  35. } RemHGLOBAL;
  36.  
  37. typedef struct tagRemHMETAFILEPICT
  38. {
  39.         long        mm;
  40.         long        xExt;
  41.         long        yExt;
  42.         unsigned long cbData;
  43.         [size_is(cbData)] byte data[];
  44. } RemHMETAFILEPICT;
  45.  
  46.  
  47. typedef struct tagRemHENHMETAFILE
  48. {
  49.         unsigned long cbData;
  50.         [size_is(cbData)] byte data[];
  51. } RemHENHMETAFILE;
  52.  
  53. typedef struct tagRemHBITMAP
  54. {
  55.         unsigned long cbData;
  56.         [size_is(cbData)] byte data[];
  57. } RemHBITMAP;
  58.  
  59. typedef struct tagRemHPALETTE
  60. {
  61.         unsigned long cbData;
  62.         [size_is(cbData)] byte data[];
  63. } RemHPALETTE;
  64.  
  65. typedef struct tagRemBRUSH
  66. {
  67.         unsigned long cbData;
  68.         [size_is(cbData)] byte data[];
  69. } RemHBRUSH;
  70.  
  71. cpp_quote("#if !defined(_WIN32) && !defined(_MPPC_)" )
  72. cpp_quote("// The following code is for Win16 only")
  73.  
  74. cpp_quote("#ifndef WINAPI          // If not included with 3.1 headers...")
  75.  
  76. cpp_quote("#define FAR             _far")
  77. cpp_quote("#define PASCAL          _pascal")
  78. cpp_quote("#define CDECL           _cdecl")
  79.  
  80. cpp_quote("#define VOID            void")
  81. cpp_quote("#define WINAPI      FAR PASCAL")
  82. cpp_quote("#define CALLBACK    FAR PASCAL")
  83.  
  84.  
  85. cpp_quote("#ifndef FALSE")
  86. cpp_quote("#define FALSE 0")
  87. cpp_quote("#define TRUE 1")
  88. cpp_quote("#endif // !FALSE")
  89.  
  90. cpp_quote("#ifndef _BYTE_DEFINED")
  91. cpp_quote("#define _BYTE_DEFINED")
  92. typedef unsigned char BYTE;
  93. cpp_quote("#endif // !_BYTE_DEFINED")
  94.  
  95. cpp_quote("#ifndef _WORD_DEFINED")
  96. cpp_quote("#define _WORD_DEFINED")
  97. typedef short WORD;
  98. cpp_quote("#endif // !_WORD_DEFINED")
  99.  
  100. typedef int UINT;
  101. typedef int  INT;
  102. typedef long BOOL;
  103.  
  104. cpp_quote("#ifndef _LONG_DEFINED")
  105. cpp_quote("#define _LONG_DEFINED")
  106. typedef long LONG;
  107. cpp_quote("#endif // !_LONG_DEFINED")
  108.  
  109. cpp_quote("#ifndef _WPARAM_DEFINED")
  110. cpp_quote("#define _WPARAM_DEFINED")
  111. typedef UINT WPARAM;
  112. cpp_quote("#endif // _WPARAM_DEFINED")
  113.  
  114. cpp_quote("#ifndef _DWORD_DEFINED")
  115. cpp_quote("#define _DWORD_DEFINED")
  116. typedef long DWORD;
  117. cpp_quote("#endif // !_DWORD_DEFINED")
  118.  
  119. cpp_quote("#ifndef _LPARAM_DEFINED")
  120. cpp_quote("#define _LPARAM_DEFINED")
  121. typedef LONG LPARAM;// this should be a discriminated union.
  122. cpp_quote("#endif // !_LPARAM_DEFINED")
  123.  
  124. cpp_quote("#ifndef _LRESULT_DEFINED")
  125. cpp_quote("#define _LRESULT_DEFINED")
  126. typedef LONG LRESULT;
  127. cpp_quote("#endif // !_LRESULT_DEFINED")
  128.  
  129. typedef void * HANDLE;
  130. #define DECLARE_WIREM_HANDLE(name)  \
  131.                              typedef [wire_marshal(wire ## name)] void * name
  132. #define DECLARE_HANDLE(name) typedef void * name
  133.  
  134. DECLARE_HANDLE(HMODULE);
  135. DECLARE_HANDLE(HINSTANCE);
  136. DECLARE_HANDLE(HRGN);
  137. DECLARE_HANDLE(HTASK);
  138. DECLARE_HANDLE(HKEY);
  139.  
  140. DECLARE_HANDLE(HDESK);
  141.  
  142. DECLARE_HANDLE(HMF);
  143. DECLARE_HANDLE(HEMF);
  144.  
  145. DECLARE_HANDLE(HPEN);
  146. DECLARE_HANDLE(HRSRC);
  147. DECLARE_HANDLE(HSTR);
  148. DECLARE_HANDLE(HWINSTA);
  149. DECLARE_HANDLE(HKL);
  150. DECLARE_HANDLE(HGDIOBJ);
  151.  
  152. typedef HANDLE HDWP;
  153.  
  154. cpp_quote("#ifndef _HFILE_DEFINED")
  155. cpp_quote("#define _HFILE_DEFINED")
  156. typedef INT HFILE;      /* Polymorphic with C runtime file handle type */
  157. cpp_quote("#endif // !_HFILE_DEFINED")
  158.  
  159.  
  160. cpp_quote("#ifndef _LPWORD_DEFINED")
  161. cpp_quote("#define _LPWORD_DEFINED")
  162. typedef WORD *LPWORD;
  163. cpp_quote("#endif // !_LPWORD_DEFINED")
  164.  
  165.  
  166. cpp_quote("#ifndef _LPDWORD_DEFINED")
  167. cpp_quote("#define _LPDWORD_DEFINED")
  168. typedef DWORD *LPDWORD;
  169. cpp_quote("#endif // !_LPDWORD_DEFINED")
  170.  
  171.  
  172. typedef char CHAR;
  173. typedef [string] CHAR *LPSTR;
  174. typedef [string] const CHAR *LPCSTR;
  175.  
  176.  
  177. cpp_quote("#ifndef _WCHAR_DEFINED")
  178. cpp_quote("#define _WCHAR_DEFINED")
  179. typedef wchar_t WCHAR;
  180. typedef WCHAR   TCHAR;
  181. cpp_quote("#endif // !_WCHAR_DEFINED")
  182.  
  183. typedef [string] WCHAR *LPWSTR;
  184.  
  185.  
  186. typedef [string] TCHAR *LPTSTR;
  187.  
  188. typedef [string] const WCHAR *LPCWSTR;
  189. typedef [string] const TCHAR *LPCTSTR;
  190.  
  191.  
  192. typedef struct tagPALETTEENTRY {
  193.     BYTE        peRed;
  194.     BYTE        peGreen;
  195.     BYTE        peBlue;
  196.     BYTE        peFlags;
  197. } PALETTEENTRY, *PPALETTEENTRY, *LPPALETTEENTRY;
  198.  
  199. // Logical Palette
  200. cpp_quote("#if 0")
  201.  
  202.     typedef struct tagLOGPALETTE {
  203.         WORD        palVersion;
  204.         WORD        palNumEntries;
  205.         [size_is(palNumEntries)] PALETTEENTRY        palPalEntry[];
  206.     } LOGPALETTE, *PLOGPALETTE, *LPLOGPALETTE;
  207.  
  208. cpp_quote("#else")
  209. cpp_quote("typedef struct tagLOGPALETTE {")
  210. cpp_quote("    WORD        palVersion;")
  211. cpp_quote("    WORD        palNumEntries;")
  212. cpp_quote("    PALETTEENTRY        palPalEntry[1];")
  213. cpp_quote("} LOGPALETTE, *PLOGPALETTE, *LPLOGPALETTE;")
  214. cpp_quote("#endif")
  215.  
  216.  
  217. cpp_quote("#ifndef _COLORREF_DEFINED")
  218. cpp_quote("#define _COLORREF_DEFINED")
  219. typedef DWORD COLORREF;
  220. cpp_quote("#endif // !_COLORREF_DEFINED")
  221.  
  222. cpp_quote("#ifndef _LPCOLORREF_DEFINED")
  223. cpp_quote("#define _LPCOLORREF_DEFINED")
  224. typedef DWORD *LPCOLORREF;
  225. cpp_quote("#endif // !_LPCOLORREF_DEFINED")
  226.  
  227.  
  228. typedef HANDLE *LPHANDLE;
  229.  
  230. //typedefs for remotable types from wingdi.h
  231.  
  232. typedef struct _RECTL
  233. {
  234.     LONG    left;
  235.     LONG    top;
  236.     LONG    right;
  237.     LONG    bottom;
  238. } RECTL, *PRECTL, *LPRECTL;
  239.  
  240.  
  241. typedef struct tagPOINT
  242. {
  243.     LONG  x;
  244.     LONG  y;
  245. } POINT, *PPOINT, *LPPOINT;
  246.  
  247. typedef struct _POINTL
  248. {
  249.     LONG  x;
  250.     LONG  y;
  251. } POINTL, *PPOINTL;
  252.  
  253.  
  254. cpp_quote("#ifndef WIN16")
  255. typedef struct tagSIZE
  256. {
  257.     LONG        cx;
  258.     LONG        cy;
  259. } SIZE, *PSIZE, *LPSIZE;
  260. cpp_quote("#else // WIN16")
  261. cpp_quote("typedef struct tagSIZE")
  262. cpp_quote("{")
  263. cpp_quote("    INT cx;")
  264. cpp_quote("    INT cy;")
  265. cpp_quote("} SIZE, *PSIZE, *LPSIZE;")
  266. cpp_quote("#endif // WIN16")
  267.  
  268.  
  269. typedef struct tagSIZEL
  270. {
  271.     LONG cx;
  272.     LONG cy;
  273. } SIZEL, *PSIZEL, *LPSIZEL;
  274.  
  275.  
  276. cpp_quote("#endif  //WINAPI")
  277. cpp_quote("#endif  //!WIN32 && !MPPC")
  278.  
  279. cpp_quote("#if defined(_WIN32) && !defined(OLE2ANSI)")
  280.  
  281. typedef WCHAR                   OLECHAR;
  282. typedef [string] OLECHAR       *LPOLESTR;
  283. typedef [string] const OLECHAR *LPCOLESTR;
  284. cpp_quote("#define OLESTR(str) L##str")
  285.  
  286. cpp_quote("")
  287. cpp_quote("#else")
  288. cpp_quote("")
  289.  
  290. cpp_quote("typedef char      OLECHAR;")
  291. cpp_quote("typedef LPSTR     LPOLESTR;")
  292. cpp_quote("typedef LPCSTR    LPCOLESTR;")
  293. cpp_quote("#define OLESTR(str) str")
  294.  
  295. cpp_quote("#endif")
  296.  
  297.  
  298. // This block contains types that are normally defined by the nt sdk in WINDEF.H
  299. // but we need them here for definitions that follow in this file.  If WINDEF.H
  300. // hasn't been included then we need to define them now so that WTYPES.H
  301. // will compile.
  302. cpp_quote("#ifndef _WINDEF_")
  303. typedef const RECTL *LPCRECTL;
  304.  
  305. typedef void * PVOID, * LPVOID;
  306. typedef float   FLOAT;
  307.  
  308. typedef struct tagRECT
  309. {
  310.     LONG    left;
  311.     LONG    top;
  312.     LONG    right;
  313.     LONG    bottom;
  314. } RECT, *PRECT, *LPRECT;
  315. typedef const RECT *LPCRECT;
  316.  
  317. cpp_quote("#endif  //_WINDEF_")
  318.  
  319.  
  320. typedef unsigned char   UCHAR;
  321. typedef short           SHORT;
  322. typedef unsigned short  USHORT;
  323. typedef DWORD           ULONG;
  324. typedef double          DOUBLE;
  325.  
  326. cpp_quote("#ifndef _DWORDLONG_")
  327. typedef unsigned __int64 DWORDLONG;
  328. typedef